import React from 'react';
import { createBrowserRouter } from 'react-router-dom';
import AppLayout from '../components/Layout/AppLayout';
import HomePage from '../pages/HomePage';
import CategoryPage from '../pages/CategoryPage';
import ImplementationDetailPage from '../pages/ImplementationDetailPage';
import SearchPage from '../pages/SearchPage';
import TagPage from '../pages/TagPage';

export const router = createBrowserRouter([
  {
    path: '/',
    element: <AppLayout />,
    children: [
      {
        index: true,
        element: <HomePage />,
      },
      {
        path: 'category/:categoryId',
        element: <CategoryPage />,
      },
      {
        path: 'implementation/:implementationId',
        element: <ImplementationDetailPage />,
      },
      {
        path: 'search',
        element: <SearchPage />,
      },
      {
        path: 'tag/:tagId',
        element: <TagPage />,
      },
    ],
  },
]);
